<?php
$this->breadcrumbs = array(
    '产品线管理',
);
?>

<?php $this->widget('bootstrap.widgets.TbGridView', array(
    'type'=>'striped bordered condensed',
    'dataProvider'  =>  $dataProvider,
    'pager'=>array(
        'class'=>'CLinkPager',           
        'nextPageLabel'=>'下一页',           
        'prevPageLabel'=>'上一页',           
        'header'=>'',   
    ),   
    'selectableRows'=> 2,
    'summaryText'   =>  '显示{start}-{end}条.共{count}条记录,当前第{page}页',
    'columns'       =>  array(
        array(
            'class' =>  'CCheckBoxColumn',
        ),
        array(
            'header'=>  '#',
            'name'  =>  'product_id',
            'value' =>  '$data->product_id'
        ),
        array(
            'name'  =>  'product_name',
            'value' =>  '$data->product_name',
        ),
        array(
            'class' =>  'bootstrap.widgets.TbButtonColumn',
            'template'=>'{delete}',           
            'buttons'=>array( 
                'delete'   =>  array(
                    'label'     =>  '删除产品线',
                    'url'      =>  'Yii::app()->controller->createUrl("admin/deleteProduct", array("id"=>$data->product_id))',
                ),
            ),
        ),
    ),
));
?>
